Skip to content

Fix terminal Cmd+Backspace on macOS#2027

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
SAKETH11111:fix-terminal-cmd-backspace
Apr 15, 2026
Merged

Fix terminal Cmd+Backspace on macOS#2027
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
SAKETH11111:fix-terminal-cmd-backspace

Conversation

@SAKETH11111
Copy link
Copy Markdown
Contributor

@SAKETH11111 SAKETH11111 commented Apr 15, 2026

Summary

  • map macOS Cmd+Backspace in the terminal to the standard delete-to-start-of-line control sequence

  • route that shortcut through the existing terminal write path so it stays inside xterm instead of falling through to app shortcuts

  • add regression coverage for the shortcut helper across macOS and reject cases

Root cause

The terminal drawer did not intercept Cmd+Backspace on macOS, so the shortcut never reached the terminal as the expected Ctrl+U sequence.

Validation

Issue

Closes #1976

  • bun fmt apps/web/src/keybindings.ts apps/web/src/components/ThreadTerminalDrawer.tsx apps/web/src/keybindings.test.ts
  • bun lint
  • bun typecheck (currently fails upstream in apps/server/src/provider/Layers/ClaudeAdapter.ts with unrelated TS2367 comparisons)

Note

Low Risk
Low risk: adds a macOS-only keybinding mapping and routes it through the existing terminal input path, with focused unit tests to prevent regressions.

Overview
Ensures Cmd+Backspace in the in-app terminal on macOS performs delete-to-line-start by mapping it to the ^U (\u0015) control sequence.

Adds terminalDeleteShortcutData in keybindings.ts and intercepts it in ThreadTerminalDrawer’s xterm custom key handler so the sequence is sent via the existing sendTerminalInput path (preventing the shortcut from falling through to app-level bindings), with new unit tests covering supported and rejected cases.

Reviewed by Cursor Bugbot for commit b958844. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix Cmd+Backspace delete-to-line-start shortcut in terminal on macOS

Adds a terminalDeleteShortcutData function in keybindings.ts that maps Cmd+Backspace on macOS keydown events to the ^U control sequence (\u0015), returning null for all other platforms or modifier combinations. The ThreadTerminalDrawer intercepts this shortcut in the custom key event handler and sends the sequence to the backend via sendTerminalInput.

Macroscope summarized b958844.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 15, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ad46c7b7-9a25-4376-b1db-058a9811351c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 15, 2026
@SAKETH11111
Copy link
Copy Markdown
Contributor Author

SAKETH11111 commented Apr 15, 2026

After:

Screen.Recording.2026-04-14.at.10.39.27.PM.mov

@SAKETH11111 SAKETH11111 marked this pull request as ready for review April 15, 2026 03:45
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Apr 15, 2026

Approvability

Verdict: Approved

A small, well-tested bug fix adding Cmd+Backspace support for macOS terminal input. The implementation follows existing keyboard shortcut patterns exactly, includes comprehensive unit tests, and has no security or infrastructure implications.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge juliusmarminge enabled auto-merge (squash) April 15, 2026 06:26
@juliusmarminge juliusmarminge merged commit 7968f27 into pingdotgg:main Apr 15, 2026
10 checks passed
aaditagrawal added a commit to aaditagrawal/t3code that referenced this pull request Apr 16, 2026
Integrates upstream/main (d22c6f5) into the fork while preserving all
multi-provider support (codex, claudeAgent, copilot, cursor, opencode,
geminiCli, amp, kilo) and fork UI/UX additions.

Highlights adopted from upstream:
- Nightly release channel + update channel selector (pingdotgg#2012, pingdotgg#2049, pingdotgg#1969)
- Filesystem browse API + command palette project picker (pingdotgg#2024)
- Launch Args setting for Claude provider (pingdotgg#1971)
- Kiro editor support in open picker (pingdotgg#1974)
- Claude plan events for TodoWrite during input streaming (pingdotgg#1541)
- Lost provider session recovery (pingdotgg#1938)
- Cache provider status and gate desktop startup (pingdotgg#1962)
- LegendList migration for chat scrolling and branch lists (pingdotgg#1953)
- Shell snapshot queries + backfill migration (pingdotgg#1973, pingdotgg#2004)
- PATH hydration + fallback detection (pingdotgg#1799)
- Warm sidebar thread subscriptions (pingdotgg#2001)
- Full thread title tooltip (pingdotgg#1994)
- Markdown file link UX (pingdotgg#1956), composer polish (pingdotgg#1944, pingdotgg#1992, pingdotgg#1985)
- Worktree/branch state + draft reuse fixes (pingdotgg#2005, pingdotgg#2003, pingdotgg#1995, pingdotgg#1936)
- Window controls overlay for Windows/Linux (pingdotgg#1969)
- Backend readiness timeout 10s→30s (pingdotgg#1979)
- Clear tracked RPCs on reconnect, live stream subscriptions (pingdotgg#2000, pingdotgg#1972)
- Various misc fixes (pingdotgg#2051, pingdotgg#2052, pingdotgg#2025, pingdotgg#2027, pingdotgg#2049, pingdotgg#1997, pingdotgg#1975)

Fork features preserved and reconciled:
- All 8 provider adapters + conformance tests
- Extended ProviderKind union across contracts/model/settings/provider
- appearance/accentColor/themeConfig/ProviderLogo UI system
- customModels + gitTextGeneration + providerModelOptions
- Migration IDs 23 (NormalizeLegacyProviderKinds) and 24
  (RepairProjectionThreadProposedPlanImplementationColumns) kept; new
  upstream migrations registered at IDs 25-26 to avoid breaking deployed
  fork databases
- DesktopBridge: log directory channels (LOG_DIR/LIST/READ/OPEN_DIR)
  retained; getWsUrl replaced by upstream's getAppBranding
- PROVIDER_CACHE_IDS extended to all 8 providers
znoraka pushed a commit to znoraka/t3code that referenced this pull request Apr 17, 2026
Co-authored-by: Julius Marminge <julius0216@outlook.com>
tyulyukov pushed a commit to tyulyukov/marcode that referenced this pull request Apr 22, 2026
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: CMD + backspace not work in terminal

2 participants